﻿namespace Magellan.Routing.Tests.Extensions
{
    public static class RouteCollectionExtensions
    {
        public static void Register(this RouteCollection routes, string name, string path, object defaults = null, object constraints = null)
        {
            var route = new Route(name, path, () => new TestRouteHandler(), new RouteValueDictionary(defaults), new RouteValueDictionary(constraints));
            routes.Register(route);
        }
    }
}
